<template>
  <div class="flexiop">
    <div class="painan">
      <van-switch class="shang" v-model="checked" />
      <img :src="list.img_url" />
      <div class="huanxiang">
        <p>{{ list.title }}</p>
        <span class="heise"
          >{{ list.sell_price }}
          &nbsp; &nbsp; &nbsp; &nbsp;
          <van-stepper v-model="value" />
          &nbsp; &nbsp; &nbsp; &nbsp;
          <span>删除</span>
        </span>
      </div>
    </div>
  </div>
</template>

<script>
import { pageindex } from "@/apis/category";
export default {
  data() {
    return {
      checked: false,
      list: [],
      value: 1,
    };
  },
  async created() {
    const res = await pageindex();
    console.log(res);
    this.list = res.data.message[0];
    console.log(this.list);
  },
};
</script>

<style lang="less" scoped>
.flexiop {
  .painan {
    display: flex;
    flex-wrap: wrap;
    img {
      width: 70px;
      height: 75px;
    }
    .shang {
      margin-top: 20px;
      width: 55px;
    }
    .huanxiang {
      p {
        margin-top: 20px;
        font-size: 11px;
      }
      .heise {
        display: flex;
        margin-top: 10px;
        color: red;
      }
    }
  }
}
</style>